]> dgit.raspbian.org Git - gnome-shell.git/commit
extensionSystem: Always enforce disallowing extensions using sessionMode
authorJonas Dreßler <verdre@v0yd.nl>
Wed, 11 Sep 2019 18:24:17 +0000 (20:24 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Thu, 12 Sep 2019 10:24:49 +0000 (10:24 +0000)
commit2a9e065cfb896d0405e8011907d41125b4b6b4a7
treec56c46dffd25993148c17a0e85006af48bbb507f
parent4c93ef39fa2b2e0a1fb65acc5326ffbf526361d1
extensionSystem: Always enforce disallowing extensions using sessionMode

It's currently possible to circumvent the `sessionMode.allowExtensions`
property: For already enabled extensions one can call reloadExtension
via DBus, for new extensions it's possible by adding the extension to
the enabled-extensions gsettings key and setting the
disable-extension-version-validation key (which triggers a reload of
`this._enabledExtensions`) and then calling reloadExtension via DBus.

So to enforce `allowExtensions` while still allowing to update
extensions and keeping the extensionSystem synced with various gsettings
keys, replace the checks for `this._enabled` with simple checks for
`Main.sessionMode.allowExtensions` inside `_callExtensionInit()` and
`_callExtensionEnable()`.

The remaining checks for `this._enabled` are only small optimizations to
prevent running code on irrelevant sessionMode updates.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/96
js/ui/extensionSystem.js